<?php

?>
<ol class="breadcrumb">
  <li><a href="<?php echo $template->url->getLink('category');?>">Category</a></li>
  <li class="active"><a href="<?php echo $template->url->getLink('category/add');?>">Add</a></li>
</ol>

<form action="" role="form" method="POST">
    <h2>Add new Category</h2>
    <div class="form-group">
        <label>Title</label>
        <input type="text" name="val[title]" class="form-control">    
    </div>

    <div class="form-group">
        <?php if($template->get('aCategories')) : ?>
            <select class="form-control" name="val[parent_category_id]">
                <?php foreach($template->get('aCategories') as $oCategory) : ?>
                    <option value="<?php echo $oCategory->category_id; ?>"><?php echo $oCategory->title; ?></option>
                    <?php endforeach; ?>
            </select>
            <?php endif; ?>
    </div>
    <button type="submit" class="btn btn-primary">Submit</button>
</form>